package com.ruoyi.supplier.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.supplier.mapper.TbReportOutFlowMapper;
import com.ruoyi.supplier.domain.TbReportOutFlow;
import com.ruoyi.supplier.service.ITbReportOutFlowService;

/**
 * 每日营业进账流水Service业务层处理
 * 
 * @author oliver.li
 * @date 2021-08-14
 */
@Service
public class TbReportOutFlowServiceImpl implements ITbReportOutFlowService 
{
    @Autowired
    private TbReportOutFlowMapper tbReportOutFlowMapper;

    /**
     * 查询每日营业进账流水
     * 
     * @param id 每日营业进账流水ID
     * @return 每日营业进账流水
     */
    @Override
    public TbReportOutFlow selectTbReportOutFlowById(Long id)
    {
        return tbReportOutFlowMapper.selectTbReportOutFlowById(id);
    }

    /**
     * 查询每日营业进账流水列表
     * 
     * @param tbReportOutFlow 每日营业进账流水
     * @return 每日营业进账流水
     */
    @Override
    public List<TbReportOutFlow> selectTbReportOutFlowList(TbReportOutFlow tbReportOutFlow)
    {
        return tbReportOutFlowMapper.selectTbReportOutFlowList(tbReportOutFlow);
    }

    /**
     * 新增每日营业进账流水
     * 
     * @param tbReportOutFlow 每日营业进账流水
     * @return 结果
     */
    @Override
    public int insertTbReportOutFlow(TbReportOutFlow tbReportOutFlow)
    {
        tbReportOutFlow.setCreateTime(DateUtils.getNowDate());
        return tbReportOutFlowMapper.insertTbReportOutFlow(tbReportOutFlow);
    }

    /**
     * 修改每日营业进账流水
     * 
     * @param tbReportOutFlow 每日营业进账流水
     * @return 结果
     */
    @Override
    public int updateTbReportOutFlow(TbReportOutFlow tbReportOutFlow)
    {
        tbReportOutFlow.setUpdateTime(DateUtils.getNowDate());
        return tbReportOutFlowMapper.updateTbReportOutFlow(tbReportOutFlow);
    }

    /**
     * 批量删除每日营业进账流水
     * 
     * @param ids 需要删除的每日营业进账流水ID
     * @return 结果
     */
    @Override
    public int deleteTbReportOutFlowByIds(Long[] ids)
    {
        return tbReportOutFlowMapper.deleteTbReportOutFlowByIds(ids);
    }

    /**
     * 删除每日营业进账流水信息
     * 
     * @param id 每日营业进账流水ID
     * @return 结果
     */
    @Override
    public int deleteTbReportOutFlowById(Long id)
    {
        return tbReportOutFlowMapper.deleteTbReportOutFlowById(id);
    }
}
